<?php
class ContactForm_Submission extends Db_ActiveRecord
{
	public $table_name = 'contactform_submissions';

	public $has_many = array(
      'submission_values' => array('class_name'=>'ContactForm_Value', 'foreign_key'=>'submissionID',
	     'delete'=>true));
	/* N/A fields: Created At, Created By, Updated At, Updated By
	public $implement = 'Db_AutoFootprints';
	public $auto_footprints_visible = true;
	*/	 
		 
		 
		 
	public function define_columns($context = null)
	{
		$this->define_column('submissionID', '#');
		$this->define_column('date_submitted', 'Date Submitted');
		$this->define_column('userID', 'User ID');
		//select * from 'contactform_fields'
		/*
		$form_fields = Db_DbHelper::objectArray('select * from contactform_fields');
		foreach($form_fields){
			$this->define_column( ,);
		}
		*/
		
	}
		 
}


?>